inspector: Add menu models to the tree
authorMatthias Clasen <mclasen@redhat.com>
Sun, 23 Nov 2014 02:33:57 +0000 (21:33 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Sun, 23 Nov 2014 02:38:47 +0000 (21:38 -0500)
Add both the appmenu and the menubar models as children of the
application, if they exist.

gtk/inspector/object-tree.c

index 6f0ac32e27ab8484952cf5a1289f3a6de7237d41..f8f1d2a3964bf131b5225641877b1a1267bd5d2e 100644 (file)
@@ -801,6 +801,19 @@ gtk_inspector_object_tree_append_object (GtkInspectorObjectTree *wt,
              gtk_inspector_object_tree_append_object (wt, clock, &iter, "frame-clock");
          }
     }
+
+  if (GTK_IS_APPLICATION (object))
+    {
+      GObject *menu;
+
+      menu = (GObject *)gtk_application_get_app_menu (GTK_APPLICATION (object));
+      if (menu)
+        gtk_inspector_object_tree_append_object (wt, menu, &iter, "app-menu");
+
+      menu = (GObject *)gtk_application_get_menubar (GTK_APPLICATION (object));
+      if (menu)
+        gtk_inspector_object_tree_append_object (wt, menu, &iter, "menubar");
+    }
 }
 
 void